package com.pt5.pthouduan.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;

/**
 * <p>
 * 分类表
 * </p>
 *
 * @author ljx
 * @since 2025-04-14
 */
@TableName("category")
public class Category implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId("categoryid")
    private Integer categoryid;

    private String category_name;  // 数据库列名

    private String category_description;  // 数据库列名

    // 构造方法
    public Category() {}

    public Category(Integer categoryid, String category_name, String category_description) {
        this.categoryid = categoryid;
        this.category_name = category_name;
        this.category_description = category_description;
    }

    // Getter 和 Setter 方法（遵循JavaBean规范）
    public Integer getCategoryid() {
        return categoryid;
    }

    public void setCategoryid(Integer categoryid) {
        this.categoryid = categoryid;
    }

    public String getCategory_name() {  // 注意方法名必须和属性名一致
        return category_name;
    }

    public void setCategory_name(String category_name) {  // 注意方法名必须和属性名一致
        this.category_name = category_name;
    }

    public String getCategory_description() {
        return category_description;
    }

    public void setCategory_description(String category_description) {
        this.category_description = category_description;
    }

    @Override
    public String toString() {
        return "Category{" +
                "categoryid=" + categoryid +
                ", category_name='" + category_name + '\'' +  // 修正拼写错误
                ", category_description='" + category_description + '\'' +  // 修正字段名
                '}';
    }
}